//define TINYToken

#ifndef TINYTOKEN_H
#define TINYTOKEN_H

#include "GTpl/GMap.h"
#include <string>
using std::string;

class TINYToken
{
public:
    TINYToken();
    ~TINYToken();

    enum TOKENTYPE
    {
        ENDFILE, ERROR, //book-keeping tokens
        ID, NUM, //mlticharactor tokens
        ASSIGN, EQ, LT,
        PLUS, MINUS, TIMES,
        OVER, LPAREN, RPAREN,
        SEMT, NONE
    };

    void addCharactor(const char& ch);

    void setTokenType(TOKENTYPE type);

private:
    string m_tokenString;
    TOKENTYPE m_tokenType;
};

class TINYSpecialSymTable
{
public:
    ~TINYSpecialSymTable();

    static const TINYSpecialSymTable& instance();

    TINYToken::TOKENTYPE getTokenType(const char& ch);

private:
    TINYSpecialSymTable();
    static TINYSpecialSymTable _symTable;
    GMap<char, TINYToken::TOKENTYPE>* m_tokenMap;
};

#endif // TINYTOKEN_H
